home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
me_cd22.zip
/
MUTT2.ZIP
/
XTERM.MUT
< prev
Wrap
Text File
|
1992-04-27
|
897b
|
43 lines
;; xterm.mut : intercept and map function keys for VT100 like terminals
;; C Durland Public Domain
(defun
sofkeys ; soft keys: ESC [ ...
{
(string c)
(exe-key
(switch (getchar)
"A" 0x843 ; Up arrow
"B" 0x844 ; Down arrow
"D" 0x846 ; Left arrow
"C" 0x845 ; Right arrow
"$" 0x84A ; Next
"" 0x841 ; Home
"4" { (getchar) 0x84E } ; select: ESC [ 4 ~
"5" { (getchar) 0x849 } ; Prev: ESC [ 5 ~
"6" { (getchar) 0x84A } ; Next: ESC [ 6 ~
"1" ; Functions keys: ESC [ 1 x ~
{
(c (getchar))(getchar)
(switch c
"1" 0x831 ; f1
"2" 0x832 ; f2
"3" 0x833 ; f3
"4" 0x834 ; f4
"5" 0x835 ; f5
"7" 0x836 ; f6
"8" 0x837 ; f8
"9" 0x838 ; f9
)
}
default { (msg "Unknown key")(done) }
)
)
}
MAIN
{
(bind-to-key "sofkeys" "^[[")
}
)